package com.ruoyi.project.business.timeperiod.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import com.ruoyi.framework.web.model.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.time.LocalDateTime;
import java.time.LocalTime;

/**
 * 工作站对象 schedule_time_period
 * 
 * @author ${author}
 * @date 2024-04-01
 */
@Data
public class TimePeriod extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**  */
    private Long id;

    /** 临工岗位ID */
    @Excel(name = "临工岗位ID")
    private Long tmpPostId;

    /** 临工岗位名称 */
    @Excel(name = "临工岗位名称")
    private String tmpPostName;

    /** 时段开始时间 */
    @JsonFormat(pattern = "HH:mm")
    @Excel(name = "时段开始时间", width = 30, dateFormat = "HH:mm")
    private LocalTime segmentStart;

    /** 时段结束时间 */
    @JsonFormat(pattern = "HH:mm")
    @Excel(name = "时段结束时间", width = 30, dateFormat = "HH:mm")
    private LocalTime segmentEnd;

    /** 是否删除 0:否 1:是 */
    @Excel(name = "是否删除 0:否 1:是")
    private Boolean deleted;

    /** 事件操作人id */
    @Excel(name = "事件操作人id")
    private Long creator;

    /** 事件更新人id */
    @Excel(name = "事件更新人id")
    private Long updater;

    /** 租户id */
    @Excel(name = "租户id")
    private Long tenantId;



    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("tmpPostId", getTmpPostId())
            .append("tmpPostName", getTmpPostName())
            .append("segmentStart", getSegmentStart())
            .append("segmentEnd", getSegmentEnd())
            .append("deleted", getDeleted())
            .append("creator", getCreator())
            .append("updater", getUpdater())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("tenantId", getTenantId())
            .toString();
    }
}
